#ifndef CAPTURE_CLASS
#define CAPTURE_CLASS

#include <coredataunit.hpp>
#include <coredataqueue.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <pland.hpp>


class Capture
{
public:
    Capture(int dev, pland::SharedDQueue qB, pland::SharedDQueue qG, pland::SharedDQueue qR);
    ~Capture();
    void start();
    void stop();
private:
    enum Channel {RED,GREEN,BLUE};
    int dev_;
    void encoder(pland::Data_Queue<cv::Mat> *in, pland::SharedDQueue qout);
    pland::SharedDQueue qB_;
    pland::SharedDQueue qG_;
    pland::SharedDQueue qR_;

    boost::thread * bt_;
    boost::thread *gt_;
    boost::thread *rt_;

};

#endif
